package com.threadlocaldemo.servlet;

import com.threadlocaldemo.service.UserService;
import com.threadlocaldemo.service.impl.UserServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/index")
public class IndexServlet extends HttpServlet {
    UserService userService = new UserServiceImpl();
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        //userService.login(req.getParameter("userName"),req.getParameter("password"),req.getParameter("rem"));
        userService.login();

        resp.getWriter().write("ok...");
    }
}
